package vip.xiaonuo.modular.manage.tsdatarecord.parser;

import lombok.Data;
import vip.xiaonuo.modular.manage.tsdatarecord.entity.BaseDataTable;

/**
 * TableSchema
 *
 * @author JackLee
 * 2022/8/5 21:30
 */
@Data
public class TableColumn {

    private String title;

    private String dataIndex;

    private Integer sort;

    private Boolean ellipsis = true;

    public BaseDataTable transform(Long recordId) {
        BaseDataTable table = new BaseDataTable();
        table.setRecordId(recordId);
        table.setDataIndex(dataIndex);
        table.setSort(sort);
        table.setTitle(title);
        table.setAliasName(title);
        return table;
    }
}
